package ch03;

/**
 * Created by 其 on 2016/3/20.
 */
public class Gcd {
    public static void main(String[] args) {
        int m = 1000, n = 495, temp;
        while(n != 0) {
            temp = m % n;
            m = n;
            n = temp;
        }
        System.out.println("The gcd of 1000 and 495 is : "+m);
    }
}
